using System.Linq;

namespace Magiq.Delete
{
    public class Delete<T> : IDelete<T> where T : class
    {
        public Delete(IQueryable<T> source)
        {
            Source = source;
        }

        #region IDelete<T> Members

        public int Execute()
        {
            var strategy = MagiqConfigurator.ForDelete(this);
            return strategy.Execute();
        }

        public IQueryable<T> Source { get; private set; }

        #endregion
    }
}